<?php
	require_once("../../../oh.framework/oh.framework.php");
	
	oh("config")->from_array(array(
		"db" => array(
			"name" => "ohdoc",
		)
	));		
	
	oh("pagemanage")
		->rule("page",array("home","module"))
		->rule("view",oh("kernel")->list_modules())
		->rule("action","edit")
	;
	
	$page = oh("pagemanage")->this();
	oh_dump(
		$page
	);
	/*
	oh("model")->new_class("modulepage");
	$modules = oh("kernel")->list_modules();
	foreach ($modules as $m) {
		oh("model")->new_object("class=modulepage&name=$m");
	}
	*/
	
	oh("page")
		->width("auto")
		->header_title("oh.doc")
		->content_body("manage_content_body")
		->show();
		
	function manage_content_body() {
		$page = oh("pagemanage")->this();
		$module = $_GET["module"];
		$action = $_GET["action"];
		oh("page")->content_title("ciao");
		if ($action == "edit") {
			oh("simpleform")
				->open("editform")
				->submit("Save")
				->submit("Close")->br()
				->textarea("content","",'cols="80" rows="10"')->br()
				->close();
		}
	}
?>
